Build a manpage for gpsbabel using help2man.
authorBernd Zeimetz <bernd@bzed.de>
Tue, 4 May 2010 20:21:43 +0000 (22:21 +0200)
committerBernd Zeimetz <bernd@bzed.de>
Tue, 4 May 2010 20:21:43 +0000 (22:21 +0200)
debian/control
debian/gpsbabel.help2man [new file with mode: 0644]
debian/gpsbabel.manpages [new file with mode: 0644]
debian/rules

index 81977ae4696aca3d41fae2bbb9d406d6113ea457..cf1af039bc8b3b65c3ba938eb6fc44ec66785414 100644 (file)
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Bernd Zeimetz <bzed@debian.org>
 Build-Depends: debhelper (>= 7.0.0), quilt,
  autotools-dev, autoconf,
- libexpat1-dev, expat,
+ libexpat1-dev, expat, help2man,
  texlive-base-bin, texlive-base, fop,
  xsltproc, docbook-xml, docbook-xsl, libxml2-utils,
  libusb-dev, zlib1g-dev, libpaper-dev, libqt4-dev
diff --git a/debian/gpsbabel.help2man b/debian/gpsbabel.help2man
new file mode 100644 (file)
index 0000000..310c0f3
--- /dev/null
@@ -0,0 +1,3 @@
+[see also]
+Detailed lists of filters and formats are given in the doc at /usr/share/doc/gpsbabel/htmldoc/.
+
diff --git a/debian/gpsbabel.manpages b/debian/gpsbabel.manpages
new file mode 100644 (file)
index 0000000..d4c44be
--- /dev/null
@@ -0,0 +1 @@
+debian/gpsbabel.1
index 84ad02feaa80bcdda2ea74cc8538740851a78907..1b42a4336037f013d2a53b681f6b1ae7309f6be5 100755 (executable)
@@ -5,7 +5,7 @@
 
 PKG_GPSBABEL=gpsbabel
 PKG_GPSBABEL_GUI=gpsbabel-gui
-
+VERSION := $(shell dpkg-parsechangelog | awk '/^Version/ {print $$2}')
 
 #we use quilt to handle our patches
 include /usr/share/quilt/quilt.make
@@ -36,10 +36,23 @@ endif
 
        touch $@
 
+debian/gpsbabel.1:
+       export PATH="$(CURDIR):$$PATH" ;\
+       help2man        --manual='gpsbabel documentation' \
+                       --section=1 \
+                       --name='GPS route and waypoint data converter' \
+                       --source='http://www.gpsbabel.org' \
+                       --locale=C \
+                       -N \
+                       --version-string=$(VERSION) \
+                       --opt-include=$(CURDIR)/debian/gpsbabel.help2man \
+                       -o $@ \
+                       gpsbabel
+
 gui/Makefile: patch
        cd gui && qmake-qt4
 
-build: build-stamp build-gui-stamp
+build: build-stamp build-gui-stamp debian/gpsbabel.1
 
 build-stamp: configure-stamp 
        dh_testdir
@@ -74,6 +87,7 @@ clean-patched:
                zlib/empty jeeps/Makefile shapelib/Makefile
        rm -f config.guess config.sub
        rm -rf gui/Makefile gui/objects gui/setup.iss
+       rm -f debian/gpsbabel.1
        dh_clean 
 
 install: build-stamp build-gui-stamp